FROM java:8
EXPOSE 8080

VOLUME /tmp
ADD target/*.jar  /app.jar
RUN bash -c 'touch /app.jar'
#ENTRYPOINT ["java","-jar","/app.jar","--spring.profiles-active=prod"]
# 限制内存的启动.如果pod第一次申请创建的资源过大，超出了k8s配置中limits的值，k8s会将pod杀死，然后进入无线重启状态
ENTRYPOINT ["java","-jar","-Xms128m","-Xmx300m","/app.jar","--spring.profiles.active=prod"]